home *** CD-ROM | disk | FTP | other *** search
- Path: news.lpr.carel.fi!usenet
- From: Ari Lukumies <aril@cmt.lpr.mail.carel.fi>
- Newsgroups: comp.lang.c
- Subject: Re: Turbo C to 80386 Assy Calling Problem
- Date: Tue, 05 Mar 1996 13:09:29 +0200
- Organization: Carelcomp Forest
- Message-ID: <313C20E9.6EE1@cmt.lpr.mail.carel.fi>
- References: <PUMPHREY.96Mar1172435@icarus.ERA.COM>
- NNTP-Posting-Host: renoir.cclahti.carel.fi
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 2.0 (WinNT; I)
-
- Mark Pumphrey wrote:
- >
- > I am having a hard time building seperate objects from
- > assembler and c sources that can reference each other.
- >
- > 1. If I build using an object library, does not work...
- >
- > tasm get_cpx.asm, get_cpx.obj
- > Turbo Assembler Version 1.01
- >
- > tlib libcc.lib -+ get_cpx.obj
- > tlib 3.02
- >
- > tcc -v -lc -etest.exe test.c libcc.lib
- > Turbo C++ version 1.01
- >
- > Error: Undefined symbol _get_cpx in module test.c
- >
- > 2. If I build all at once, does work...
- >
- > tcc -v -etest.exe test.c get_cpx.asm
- >
- > 3. Source code...
- >
- > #define DECLARATIONS
- >
- > #include <stdio.h> /* used for debugging */
- > #include "common.h"
- > extern int get_cpx();
- > main()
- > {
- > int i;
- >
- > i=get_cpx();
- > printf("i=%d\n",i);
- > }
- >
- > .model small
- > .code
- > public _get_cpx
- > _get_cpx proc
- > mov ax,23
- > ret
- > _get_cpx endp
- > end
- >
- > If anyone knows how to crack this puzzle, sure would
- > help. I tried contacting Borland but just got ignored.
- >
-
- Tasm, by default, converts exported names to upper-case. Use a command-line flag to
- disable this (type tasm or tasm -? for help).
-
- HTH,
- AriL
- --
- All my opinions are mine and mine alone.
-